﻿using LyData.Data;
using System;
using System.Data;
using System.Web;
using System.Web.Configuration;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Admin_Desktop : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string str = (string)this.Session["managerName"];
        if (str != null)
        {
            IDb db = new DbFactory().DriverDb();
            db.Open();
            DataRow row = db.TopRow("ManagerName,PenName,AddTime,UpTime,LoginTime,LastLoginTime,LoginIP,LastLoginIP,LoginCount", "manager", string.Format("ManagerName='{0}'", str), "");
            db.Close();
            this.ManagerName.Text = (string)row["ManagerName"];
            this.PenName.Text = (string)row["PenName"];
            this.LoginCount.Text = (string)row["LoginCount"];
            this.AddTime.Text = (string)row["AddTime"];
            this.UpTime.Text = (string)row["UpTime"];
            this.LastLoginTime.Text = (string)row["LastLoginTime"];
            this.LoginTime.Text = (string)row["LoginTime"];
            this.LastLoginIP.Text = (string)row["LastLoginIP"];
            this.LoginIP.Text = (string)row["LoginIP"];
        }
        string str2 = HttpContext.Current.Request.ServerVariables["SERVER_NAME"].ToLower();
        
        //this.DomainNameLabel.Text = str2;
        //string str3 = WebConfigurationManager.AppSettings["shanRuiSN"];
        //this.SNBox.Text = str3;
        ClientScriptManager clientScript = this.Page.ClientScript;
        //string str4 = @"myConfirm('消息提示','您当前使用的是 点点信息企业网站管理系统  <br />您是否希望到官方注册商业版？<br />[此提示仅本页显示，不影响正常使用]','SetSRLocation(\'http://www.16395.net/\');')";
        //str4 = string.Format("<script language=\"JavaScript\" type=\"text/javascript\" >{0}</script>", str4);
        clientScript.RegisterStartupScript(base.GetType(), "alertD", "");
    }
}
